﻿
Namespace Console

    Public Class TransactionCommandHandler : Implements IConsoleCommandHandler

        Private Const C_COMMAND As String = "trans"

        Public ReadOnly Property Command As String Implements IConsoleCommandHandler.Command
            Get
                Return C_COMMAND
            End Get
        End Property

        Public Sub Execute(ByVal commandWithParams() As String) Implements IConsoleCommandHandler.Execute

            Dim pm As Plugins.PluginManager _
                = Plugins.PluginManager.GetInstance()

            Dim command As String = commandWithParams(1)

            Dim argumentList As New List(Of String)(commandWithParams)
            argumentList.RemoveRange(0, 2)

            pm.StartTransaktion(command, argumentList.ToArray())

        End Sub

    End Class

End Namespace